﻿using System.Collections.Generic;

namespace FlagTunes.Core
{
    public class Playlist
    {
        /// <summary>
        /// Gets or sets a value indicating whether this <see cref="Playlist"/> gets repeated.
        /// </summary>
        /// <value>
        ///   <c>true</c> if this playlist gets repeated; otherwise, false.
        /// </value>
        public bool Repeat { get; set; }

        /// <summary>
        /// Gets the name of the playlist.
        /// </summary>
        public string Name { get; private set; }

        /// <summary>
        /// Gets the songs in the playlist.
        /// </summary>
        public IList<Song> Songs { get; private set; }

        /// <summary>
        /// Initializes a new instance of the <see cref="Playlist"/> class.
        /// </summary>
        /// <param name="name">The name.</param>
        public Playlist(string name)
        {
            this.Name = name;
            this.Songs = new List<Song>();
        }

        /// <summary>
        /// Returns a <see cref="System.String"/> that represents this instance.
        /// </summary>
        /// <returns>
        /// A <see cref="System.String"/> that represents this instance.
        /// </returns>
        public override string ToString()
        {
            return this.Name;
        }
    }
}